package com.thwj.project.biz.enums;

public enum UserGenderEnum {
    man(1,"男"),
    woman(2,"女"),
    ;
    UserGenderEnum(int value, String name){
        this.name = name;
        this.value = value;
    }

    private int value;
    private String name;

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }


    public static UserGenderEnum getEnumByName(String name){
        for (UserGenderEnum typeEnum : UserGenderEnum.values()) {
            if(typeEnum.name.equals(name)) {
                return typeEnum;
            }
        }
        return null;
    }
}
